import random
g=input()
for i in range(int(g)):
    def region(a,b):
        return random.randint(a,b)
    a=region(110000,659004)
    def birth(a,b):
        return random.randint(a,b)
    nian=birth(2000,2023)
    yue=birth(1,12)
    if yue in (1,3,5,7,8,10,12):
        ri=birth(1,31)
    elif yue==2:
        ri=birth(1,28)
    else:
        ri=birth(1,30)
    if yue<10:
        yue=str(0)+str(yue)
    if ri<10:
        ri=str(0)+str(ri)
    def order(a,b):
        return random.randint(a,b)
    c=order(1000,9999)
    def main(a,b,c,d,e):
        return print('随机生成的身份证号码为：'+str(a)+str(b)+str(c)+str(d)+str(e))
    main(a,nian,yue,ri,c)
